Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update featured shapes #277

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

dogle-scottlogic
Copy link
Contributor

Addresses issue #100
Un-b0rk one of the feature shapes (top left in image bellow)

blogshaped

Copy link
Member

@chriswilty chriswilty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but can be simplified...

@@ -40,7 +40,7 @@ <h3 class="cell">
</svg>
{% when "shape3" %}
<svg class="bg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 650 410" preserveAspectRatio="none">
<polygon points="0 0 352 0 460 87 650 87 650 410 0 410"/>
<polygon points="0 0 350 0 300 0 400 0 850 500 0 950"/>
Copy link
Member

@chriswilty chriswilty Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second and third points are redundant, so this can be simply
0 0 400 0 850 500 0 950

Note that commas are allowed in this value, so you can also write it like this which might help:
0,0 400,0 850,500 0,950

If you set the viewbox to the full shape, this is what you see:

image

Then truncating the viewbox gives us our shape, as preserveAspectRatio is turned off.

@chriswilty chriswilty merged commit 860138f into ScottLogic:gh-pages Nov 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants